home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00051_OKonLocPop.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  868 b   |  30 lines

  1. on mouseDown
  2.   global gUserObject, gLevelObject, gSimObject, gMenuObject, gVTLgameObject
  3.   if buttonHandler() = 1 then
  4.     repeat with level = 1 to count(the booleanList of gLevelObject)
  5.       if getAt(the booleanList of gLevelObject, level) = 1 then
  6.         exit repeat
  7.       end if
  8.     end repeat
  9.     if level <> the level of gLevelObject then
  10.       set the newLevel of gLevelObject to level
  11.       if the saveEnabled of gMenuObject and gameInProgress(gMenuObject) then
  12.         go("SaveLevel")
  13.         exit
  14.       else
  15.         go("Promotion")
  16.         go(the frame + 1)
  17.         startTimer()
  18.         goToNewLevel(gLevelObject)
  19.         repeat while the timer < 60
  20.         end repeat
  21.         drawUserLevel(gUserObject)
  22.       end if
  23.     end if
  24.     playLevelSound(gLevelObject, level)
  25.     puppetTransition(51, 1)
  26.     go(label("LocMap") + 1)
  27.     showAllActors()
  28.   end if
  29. end
  30.